HeaderProvider

fun fun interface HeaderProvider : RequestHandler

An object or lambda that provides some headers.

Functions

canHandleAuthentication
Link copied to clipboard
open fun canHandleAuthentication(response: HttpResponse): Boolean
If this returns true, handleAuthentication must be implemented.
handleAuthentication
Link copied to clipboard
open suspend fun handleAuthentication(client: HttpClient, url: URL, data: Any, options: <ERROR CLASS>): HttpResponse
Will not be called unless canHandleAuthentication is true.
headers
Link copied to clipboard
abstract fun MutableHeaders.headers()
plus
Link copied to clipboard
open operator fun plus(other: HeaderProvider): HeaderProvider
prepareRequest
Link copied to clipboard
open override fun <ERROR CLASS>.prepareRequest(headers: MutableHeaders)
Modify an outgoing request.

Inheritors

BasicAuthHandler
Link copied to clipboard
BearerAuthHandler
Link copied to clipboard
PersonalAccessTokenAuthHandler
Link copied to clipboard

Extensions

toMap
Link copied to clipboard
fun HeaderProvider.toMap(): Map<String, String>

Sources

js source
Link copied to clipboard